<#--此userform是用于index页面右上角编辑用户，与标准的用户管理form有区别-->
<#escape x as x?html>
<div id="userEdit" style="background-color: #adc4d4;padding:10px 8px">
    <div style="margin-bottom: 8px">
        <span class="fa fa-user fa-lg" style="margin-left:6px;margin-right: 10px;color: #3e4659;"></span>
        <span style="color: #3e4659;font-weight: 600"><@s.message "index.user.indexModal.title"/></span>
        <span style="float: right;color: #3e4659;font-weight: 600"><@s.message "index.user.indexModal.info"/></span>
        <span style="float:right;margin-right: 5px"><input class="user-info-action" type="checkbox"></span>
    </div>
    <div class="modal-body" id="userFormBody" style="background-color: #ebf1f7">
        <form class="form" name="recordForm" id="recordForm" method="post" action="${actionType!}">

            <fieldset>
                <div id="user-id" hidden>${user.id!''}</div>
                <div style="width: 32%;float:left;margin-right: 10px">
                    <div style="font-size: 18px">
                        <i class="fa fa-sign-in" style="color: #c82a20;"></i>
                        <span style="color:#3e4659;font-weight: 600"><@s.message "index.user.indexModal.loginInfo"/></span>
                    </div>
                    <small class="muted" style="color:#3e4659;"><@s.message "index.user.indexModal.loginInfo.des"/>
                    </small>
                </div>
                <div style="float:right;width: 64%;">
                    <input type="text" class="hide"
                           name="id" value="${(user.id)!}">
                    <div class="form-group">
                        <label style="color: #3e4659" class="control-label"
                               for="account"><@s.message "base.user.modal.account"/></label>
                        <input type="text" class="form-control"
                               name="account" placeholder="<@s.message "base.user.modal.account"/>"
                               data-error="<@s.message "validator.error.require"/>" required
                               value="${(user.account)!}" readonly>
                        <div class="help-block with-errors"></div>
                    </div>
                    <div class="form-group">
                        <label style="color: #3e4659" for="name"><@s.message "base.user.modal.name"/></label>
                        <input id="user-name" type="text" class="form-control"
                               name="name" placeholder="<@s.message "base.user.modal.name"/>"
                               data-error="<@s.message "validator.error.require"/>" required
                               value="${(user.name)!}">
                        <div class="help-block with-errors"></div>
                    </div>
                    <div class="form-group">
                        <label style="color: #3e4659" for="password"><@s.message "base.user.modal.password"/></label>
                        <input type="password" class="form-control"
                               name="password" placeholder="<@s.message "base.user.modal.password"/>"
                               data-minlength="5" data-error="<@s.message "base.user.modal.password.error"/>" required
                               value="${(user.password)!}">
                        <div class="help-block with-errors"></div>
                    </div>
                    <div class="form-group">
                        <label style="color: #3e4659" for="repswd"><@s.message "base.user.modal.repswd"/></label>
                        <input type="password" class="form-control"
                               name="repswd" placeholder="<@s.message "base.user.modal.repswd"/>"
                               data-match="[name=password]" data-error="<@s.message "base.user.modal.repswd.error"/>"
                               required
                               value="${(user.password)!}">
                        <div class="help-block with-errors"></div>
                    </div>
                </div>
            </fieldset>
            <hr style="margin: 20px 0;border: 0;
            border-top: 1px solid #343434;
            border-bottom: 1px solid #ffffff;">
            <fieldset class="user-info" hidden>
                <div style="width: 32%;float:left;margin-right: 10px">
                    <div style="font-size: 18px">
                        <i class="fa fa-commenting-o" style="color: #78c548;"></i>
                        <span style="color:#3e4659;font-weight: 600"><@s.message "index.user.indexModal.perInfo"/></span>
                    </div>
                    <small class="muted" style="color:#3e4659;"><@s.message "index.user.indexModal.perInfo.des"/>
                    </small>
                </div>
                <div style="float:right;width: 64%;">
<#--                    <div class="form-group">
                        <label style="color: #3e4659" for="sex"><@s.message "base.user.modal.sex"/></label>
                        <select class="form-control" data-dict="sex" data-value="${(user.sex)!}"
                                name="sex" data-placeholder="<@s.message "base.user.modal.sex"/>">
                        </select>
                    </div>
                    <div class="form-group">
                        <label style="color: #3e4659" for="telephone"><@s.message "base.user.modal.telephone"/></label>
                        <input type="text" class="form-control"
                               name="telephone" placeholder="<@s.message "base.user.modal.telephone"/>"
                               value="${(user.telephone)!}">
                    </div>-->
                    <div class="form-group">
                        <label style="color: #3e4659"
                               for="mobilePhone"><@s.message "base.user.modal.mobilePhone"/></label>
                        <input type="text" class="form-control"
                               name="mobilePhone" placeholder="<@s.message "base.user.modal.mobilePhone"/>"
                               value="${(user.mobilePhone)!}">
                    </div>
                    <div class="form-group">
                        <label style="color: #3e4659" for="email"><@s.message "base.user.modal.email"/></label>
                        <input type="email" class="form-control"
                               name="email" placeholder="<@s.message "base.user.modal.email"/>"
                               data-error="<@s.message "base.user.modal.email.error"/>"
                               value="${(user.email)!}">
                        <div class="help-block with-errors"></div>
                    </div>
<#--                    <div class="form-group">
                        <label style="color: #3e4659" for="address"><@s.message "base.user.modal.address"/></label>
                        <input type="text" class="form-control"
                               name="address" placeholder="<@s.message "base.user.modal.address"/>"
                               value="${(user.address)!}">
                    </div>-->
                </div>
            </fieldset>
        </form>
    </div>
    <div class="modal-footer" id="userFooter">
        <button type="button" class="btn btn-default pull-left btn-close"
                data-dismiss="${dataDismiss!''}" id="${user.id!''}Close"><@s.message "modal.close"/></button>
    <#--<#if (type!"" == "save")>-->
        <button type="button" class="btn btn-primary pull-left btn-save"
                id="${user.id!''}Save"><@s.message "modal.save"/></button>

        <a href="/logout" class="btn btn-primary" style="background-color: #4b5d6e">
            <i class="fa fa-sign-out" style="margin-right: 10px"></i><@s.message "index.user.logout"/>
        </a>
    <#--
            </#if>
    -->
    </div>
</div>
<script>
    context.call([
        "scanSelect"
    ], function (scanSelect) {
        scanSelect.initSelect();
    });
</script>
</#escape>